<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * 68KB
 *
 * An open source knowledge base script
 *
 * @package		68kb
 * @author		68kb Dev Team
 * @copyright	Copyright (c) 2009, 68 Designs, LLC
 * @license		http://68kb.com/user_guide/license.html
 * @link		http://68kb.com
 * @since		Version 1.0
 */

// ------------------------------------------------------------------------

/**
 * KB Controller
 *
 * Main Setup Controller
 *
 * @package		68kb
 * @subpackage	Migrations
 * @category	Migrations
 * @author		68kb Dev Team
 * @link		http://68kb.com/
 * @version 	$Id: kb.php 125 2009-11-15 05:15:57Z suzkaw68 $
 */
class Comments
{
	// ------------------------------------------------------------------------

	function up()
	{
		$CI =& get_instance();
		
		$fields = array(
			'comment_approved' => array(
				'name' => 'comment_approved',
				'type' => "ENUM( 'yes', 'no', 'spam' )",
				'default' => 'no',
			),
		);
		$CI->dbforge->modify_column('comments', $fields);
		
		if ($CI->core_migrate->verbose)
		{
			return "Altering comments table...";
		}
	}

	// ------------------------------------------------------------------------

	function down()
	{
		$CI =& get_instance();
		$fields = array(
			'comment_approved' => array(
				'name' => 'comment_approved',
				'type' => "ENUM( '1', '0', 'spam' )",
				'default' => '1',
			),
		);
		$CI->dbforge->modify_column('comments', $fields);
		return TRUE;
	}
}